<template>
  <div>
    <el-button type = "success" @click="myClick">测试回调函数</el-button>
  </div>
</template>

<script>
export default {
  name: "child",
  props: {
    clickCallBack: {
      type: Function,
      required: true // 必填
    }
  },
  methods: {
    myClick() {
      this.$props.clickCallBack('这是来自子组件的问候~~~')
    }
  }
}
</script>

<style scoped>

</style>
